package com.jacklin.shopping.mall.dao;

import com.jacklin.shopping.mall.entity.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    List<Order> selectByUserId(Integer userId);

    Order selectByUserIdOrderNo(@Param("userId") Integer userId, @Param("orderNo") Long orderNo);

    List<Order> selectAllOrder();

    Order selectByOrderNo(Long orderNo);

//    List<Order> getByOrderNo(@Param("orderNo")Long orderNo,@Param("userId") Integer userId);

    //二期新增
    List<Order> selectOrderStatusByCreateTime(@Param("status") Integer status, @Param("date") String date);

    int closeOrderByOrderId(Integer id);

}